home *** CD-ROM | disk | FTP | other *** search
- Path: news.tu-chemnitz.de!news
- From: hfst@hrz.tu-chemnitz.de (Hans Steffani)
- Newsgroups: comp.lang.c
- Subject: Re: Logical exclusive-or
- Date: 6 Feb 96 14:40:44 GMT
- Organization: University of Technology Chemnitz, FRG
- Message-ID: <4f7pgg$8rn@pyrrhus-f.hrz.tu-chemnitz.de>
- References: <4f6lrq$bcr@lastactionhero.rs.itd.umich.edu> <4f7688$4te@beach.and.nl>
- NNTP-Posting-Host: tantalus-f.hrz.tu-chemnitz.de
-
- jos@and.nl (Jos A. Horsmeier) writes:
-
- >Note that although the logical 'and' and 'or' operators do not
- >evaluate their right operand if their left operand is false or
- >true resepectively, the 'logical exclusive or' operator must
- >evaluate both operands no matter what the value of the left hand
- >operand is. So the sole purpose of a '^^' operator would be a lexical
- >shorthand for:
-
- > a ^^ b == (!(a) != !(b))
-
- >That wouldn't be much of added functionality, would it?
-
- Not and Or is enough.
-
- a && b == !( !a || !b )
-
- h.f.s.
-
-
- --
- Hans Friedrich Steffani
- Institut fuer Elektrische Maschinen und Antriebe
- TU Chemnitz-Zwickau
- e-mail: hans.steffani@e-technik.tu-chemnitz.de
-